package com.bit;


import com.bit.net.component.data.client.DataClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class ServerApplication implements CommandLineRunner {

    @Autowired
    private DataClient dataClient;

    public static void main(String[] args) throws InterruptedException {
        SpringApplication application = new SpringApplication(ServerApplication.class);
        application.setWebEnvironment(false);
        application.run(args);
        Thread.currentThread().join();
    }


    @Override
    public void run(String... strings) throws Exception {
        dataClient.start();
    }
}
